package com.team9.controller;

import com.team9.po.Employee;
import com.team9.service.EmployeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *
 *  员工业务控制层
 *
 * @author YoungKai
 * @date 2021/1/7 15:47
 */
@RestController
@RequestMapping("/employee")
@Api(value = "Employee接口文档")
public class EmployeeCotroller {
    @Autowired
    private EmployeeService employeeService;

    @ApiOperation(value = "查询所有员工",httpMethod = "GET",notes = "全查")
    @RequestMapping(value = "/findAll",method = RequestMethod.GET)
    public List<Employee> findAll(){
        return employeeService.findAll();
    }
}
